<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
//============订单相关=============
Route::post('/webUploadVideo', 'SuppOrderController@webUploadVideo');
Route::post('/updatEmaterial', 'SuppOrderController@updatEmaterial');
Route::get('/readAllNperData', 'SuppOrderController@readAllNperData');
Route::get('/readOrderMsgByNperId', 'SuppOrderController@readOrderMsgByNperId');
Route::any('/sendOrderGoods', 'SuppOrderController@sendOrderGoods');
Route::get('/readAllNper', 'SuppOrderController@readAllNper');
Route::get('/readOrderDateByPage', 'SuppOrderController@readOrderDateByPage');
Route::get('/readOrderByDate', 'SuppOrderController@readOrderByDate');
Route::get('/readSaleDataByPage', 'SuppOrderController@readSaleDataByPage');
Route::get('/readSaleListByDay', 'SuppOrderController@readSaleListByDay');
Route::get('/readPickupByDay', 'SuppOrderController@readPickupByDay');
Route::get('/mainData', 'SuppOrderController@mainData');



//-----------------通用接口--------------------
Route::post('/uploadFormid', 'FormIdController@uploadFormid');
Route::get('/getOpenid', 'SuppController@getOpenid');
Route::get('/show_laravel_log/{year}/{month}/{day}', 'LogController@show_laravel_log');
Route::get('/del_laravel_log/{year}/{month}/{day}', 'LogController@del_laravel_log');
Route::get('/show_wechat_log', 'LogController@show_wechat_log');
Route::get('/del_wechat_log', 'LogController@del_wechat_log');
Route::get('/createWxaQrCode', 'SuppOrderController@createWxaQrCode');
Route::any('/prov/prov_list','SuppController@prov_list');
//-----------------供应商上报相关接口--------------------
Route::get('/getGoodsBySuppId', 'SuppReportController@getGoodsBySuppId');
Route::post('/reportNum', 'SuppReportController@reportNum');
Route::any('/getSpecMsgByGoodsId', 'SuppReportController@getSpecMsgByGoodsId');

//---------------------------------供应商管理--------------------------------------
//供应商登录
Route::any('supp/login', 'SuppController@login');
//供应商修改密码
Route::any('supp/updatePsw', 'SuppController@updatePsw');
//获取供应商首页数据
Route::any('supp/getFirstPageMsg', 'SuppController@getFirstPageMsg');
//分页获取素材商品列表
Route::any('supp/readGoodsByCondition', 'SuppController@readGoodsByCondition');
//根据id获取素材商品详情
Route::any('supp/readGoodsById', 'SuppController@readGoodsById');
//修改供应商信息
Route::any('supp/updateSuppMsg', 'SuppController@updateSuppMsg');
//根据supp_id获取供应商详情
Route::any('supp/readSuppById', 'SuppController@readSuppById');
//根据supp_id获取报表
Route::any('supp/readStatMsg', 'SuppController@readStatMsg');
//发送验证码
Route::any('supp/sendSms', 'SuppController@sendSms');
//验证码验证
Route::any('supp/vcodeVerify', 'SuppController@vcodeVerify');
//忘记密码
Route::any('supp/forgetPsw', 'SuppController@forgetPsw');

//验证手机号是否存在
Route::any('supp/validPhoneIsExist', 'SuppController@validPhoneIsExist');
//注册
Route::any('supp/register', 'SuppController@register');
//我管理的供应商列表
Route::any('supp/getSuppList', 'SuppController@getSuppList');


//==============================商品管理====================================================
//根据条件获取商品列表
Route::any('goods/readGoodsByCondition', 'SuppGoodsController@readGoodsByCondition');
//获取分组数据
Route::any('goods/readGoodsGroupList', 'SuppGoodsController@readGoodsGroupList');
//添加商品
Route::any('goods/addGoods', 'SuppGoodsController@addGoods');
//更新商品
Route::any('goods/updateGoodsMsg', 'SuppGoodsController@updateGoodsMsg');
//获取商品详情
Route::any('goods/readGoodsById', 'SuppGoodsController@readGoodsById');
//删除商品
Route::any('goods/delectGoodsByIds', 'SuppGoodsController@delectGoodsByIds');
//上架或下架商品
Route::any('goods/goodsOnlineOrDownline', 'SuppGoodsController@goodsOnlineOrDownline');
//添加规格
Route::any('goods/addSpec', 'SuppGoodsController@addSpec');
//更新规格
Route::any('goods/updateGoodsSpecMsg', 'SuppGoodsController@updateGoodsSpecMsg');
//查看规格
Route::any('goods/readSpecById', 'SuppGoodsController@readSpecById');
//删除商品规格
Route::any('goods/deleteGoodsSpecMsg', 'SuppGoodsController@deleteGoodsSpecMsg');
//查看商品所有的规格
Route::any('goods/readAllGoodsSpec', 'SuppGoodsController@readAllGoodsSpec');
//上架或下架商品规格
Route::any('goods/specOnlineOrDownline', 'SuppGoodsController@specOnlineOrDownline');



